<template>
  <a-card class="ax__template h-[100%]">
    <a-tabs>
      <template #rightExtra>
        <a-tooltip title="前往帮助中心">
          <a
            class="system__icon"
            target="_blank"
            href="https://www.yuque.com/u32997899/ax/bpduf281apr7fb54?singleDoc# 《网页配置》"
          >
            <QuestionCircleTwoTone />
          </a>
        </a-tooltip>
      </template>
      <a-tab-pane key="page-config" tab="页面配置">
        <PageConfig />
      </a-tab-pane>
      <a-tab-pane key="gen" tab="代码生成">
        <GenConfig />
      </a-tab-pane>
    </a-tabs>
  </a-card>
</template>

<script setup lang="ts">
import { getConfig } from '@/api/modules/system/config/utils';
import { sysConfig } from './data/data';
import PageConfig from './page-config/PageConfig.vue';
import GenConfig from './gen-config/GenConfig.vue';

const loading = ref(false);

const getSysConfig = async () => {
  loading.value = true;
  let data = await getConfig(sysConfig.value);
  if (data) {
    sysConfig.value = data;
    loading.value = false;
  }
};

onMounted(() => {
  getSysConfig();
});
</script>

<style lang="scss" scoped></style>
